//
// Decompiled by Jadx - 367ms
//
package fg;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.i;
import cc.a;
import me.plusne.common.Json.JsonHomeAppList;

public final class w extends BaseAdapter {
    public final LayoutInflater a;
    public JsonHomeAppList b;
    public b c;

    public w(Activity activity) {
        this.a = LayoutInflater.from(activity);
    }

    @Override
    public final int getCount() {
        JsonHomeAppList jsonHomeAppList = this.b;
        if (jsonHomeAppList != null) {
            return jsonHomeAppList.getData().size();
        }
        return 0;
    }

    @Override
    public final Object getItem(int i) {
        JsonHomeAppList jsonHomeAppList = this.b;
        if (jsonHomeAppList != null) {
            return (JsonHomeAppList.DataBean) jsonHomeAppList.getData().get(i);
        }
        return null;
    }

    @Override
    public final long getItemId(int i) {
        return 0L;
    }

    @Override
    public final View getView(int i, View view, ViewGroup viewGroup) {
        a aVar;
        JsonHomeAppList.DataBean dataBean = (JsonHomeAppList.DataBean) this.b.getData().get(i);
        if (view == null) {
            View inflate = this.a.inflate(-2113142755, (ViewGroup) null, false);
            int i2 = 0x7f82004e;
            TextView textView = (TextView) i.cg(0x7f82004e, inflate);
            if (textView != null) {
                i2 = 0x7f820068;
                TextView textView2 = (TextView) i.cg(0x7f820068, inflate);
                if (textView2 != null) {
                    i2 = 0x7f820113;
                    if (((LinearLayout) i.cg(0x7f820113, inflate)) != null) {
                        i2 = 0x7f820116;
                        ImageView imageView = (ImageView) i.cg(0x7f820116, inflate);
                        if (imageView != null) {
                            i2 = 0x7f82017d;
                            ImageView imageView2 = (ImageView) i.cg(0x7f82017d, inflate);
                            if (imageView2 != null) {
                                LinearLayout linearLayout = (LinearLayout) inflate;
                                aVar = new a(imageView, imageView2, linearLayout, textView, textView2);
                                linearLayout.setTag(aVar);
                            }
                        }
                    }
                }
            }
            throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i2)));
        }
        aVar = (a) view.getTag();
        View.OnClickListener aVar2 = new a(this, i);
        aVar.b.setText(dataBean.getApp());
        aVar.e.setOnClickListener(aVar2);
        aVar.b.setOnClickListener(aVar2);
        aVar.c.setOnClickListener(aVar2);
        aVar.d.setOnClickListener(aVar2);
        return aVar.a;
    }
}
